/* 弹窗遮罩层 */
.column-filter-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  animation: fadeIn 0.2s ease-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* 弹窗容器 */
.column-filter-modal {
  background: #ffffff;
  border-radius: 0;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  width: 90%;
  max-width: 500px;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(-20px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* 弹窗头部 */
.column-filter-modal__header {
  padding: 24px 24px 8px 24px;
}

.column-filter-modal__title {
  font-size: 18px;
  font-weight: 600;
  color: #0f3d1a;
  margin: 0;
  text-align: left;
}

/* 弹窗主体 */
.column-filter-modal__body {
  padding: 8px 24px 8px 24px;
  flex: 1;
  overflow-y: auto;
  max-height: 400px;
}

.column-filter-modal__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  padding: 20px;
  border: 1px dashed #d1d5db;
  border-radius: 6px;
}

/* 复选框项目 */
.column-filter-modal__checkbox-item {
  display: flex;
  align-items: center;
  cursor: pointer;
  padding: 8px 12px;
  border-radius: 8px;
  transition: background-color 0.2s ease;
  user-select: none;
}

.column-filter-modal__checkbox-item:hover {
  background-color: #f3f4f6;
}

.column-filter-modal__checkbox-item:has(.column-filter-modal__checkbox:checked) {
  background-color: #f0fdf4;
}

.column-filter-modal__checkbox-item:has(.column-filter-modal__checkbox:checked) .column-filter-modal__checkbox-label {
  color: #22c55e;
  font-weight: 500;
}

.column-filter-modal__checkbox {
  width: 16px;
  height: 16px;
  margin-right: 8px;
  cursor: pointer;
  accent-color: #22c55e;
  flex-shrink: 0;
  appearance: none;
  border: 2px solid #d1d5db;
  border-radius: 0px;
  background-color: #ffffff;
  position: relative;
  transition: all 0.2s ease;
}

.column-filter-modal__checkbox:hover {
  border-color: #22c55e;
}

.column-filter-modal__checkbox:checked {
  background-color: #22c55e;
  border-color: #22c55e;
  border-radius: 0px;
}

.column-filter-modal__checkbox:checked::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(45deg);
  width: 3px;
  height: 6px;
  border: solid #ffffff;
  border-width: 0 2px 2px 0;
  margin-top: -1px;
}

.column-filter-modal__checkbox-label {
  font-size: 14px;
  color: #374151;
  line-height: 1.4;
  flex: 1;
}

/* 弹窗底部 */
.column-filter-modal__footer {
  padding: 8px 24px 24px 24px;
  display: flex;
  gap: 12px;
  justify-content: center;
}

/* 按钮样式 - 与SearchHeader保持一致 */
.column-filter-modal__btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 36px;
  padding: 0 32px;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  outline: none;
  min-width: 120px;
}

.column-filter-modal__btn--confirm {
  background: linear-gradient(135deg, #4ade80 0%, #22c55e 100%);
  color: #ffffff;
  box-shadow: 0 2px 4px rgba(74, 222, 128, 0.2);
}

.column-filter-modal__btn--confirm:hover {
  background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
  box-shadow: 0 4px 8px rgba(74, 222, 128, 0.3);
}

.column-filter-modal__btn--cancel {
  background: linear-gradient(135deg, #6b7280 0%, #4b5563 100%);
  color: #ffffff;
  box-shadow: 0 2px 4px rgba(107, 114, 128, 0.2);
}

.column-filter-modal__btn--cancel:hover {
  background: linear-gradient(135deg, #4b5563 0%, #374151 100%);
  box-shadow: 0 4px 8px rgba(107, 114, 128, 0.3);
}

/* 响应式设计 */
@media (max-width: 768px) {
  .column-filter-modal {
    width: 95%;
    margin: 20px;
  }
  
  .column-filter-modal__grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    padding: 16px;
  }
  
  .column-filter-modal__body {
    padding: 16px 20px;
  }
  
  .column-filter-modal__header {
    padding: 20px 20px 12px 20px;
  }
  
  .column-filter-modal__footer {
    padding: 12px 20px 20px 20px;
  }
}

@media (max-width: 480px) {
  .column-filter-modal__grid {
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 12px;
  }
  
  .column-filter-modal__checkbox-item {
    padding: 6px 8px;
  }
  
  .column-filter-modal__btn {
    padding: 8px 20px;
    font-size: 13px;
    min-width: 100px;
  }
}
